// 读取多条销售记录，并统计每个ISBN有几条销售记录
#include <iostream>
#include "Sales_item.h"

int main()
{
    Sales_item book, currBook;
    int cnt = 1;

    if(std::cin >> currBook) // 当前输入有效
    {
        while(std::cin >> book) // 读取下一个输入
        {
            if(book.isbn() == currBook.isbn()) // 如果当前输入的isbn相同，累加book
            {
                ++cnt;
                currBook = book;
            }
            else
            {
                cnt = 1;
                std::cout << "The records of " << currBook << " is " << cnt << std::endl;
            }            
        }
    }
    
    
    return 0;
}
